<script setup>
import { onMounted,ref } from 'vue';
import user from '../../api/user';
import { useUserMangementStore } from '../../store/userMangementSelect';
import { useAddDepartmentStore } from '../../store/addDepartment';
const addDepartmentStore = useAddDepartmentStore();
const userStore = useUserMangementStore();
onMounted(async () => {
    await user.getUserManagementSelect().then(res => {
        userStore.setUserMangementSelect(res.data.data)
    }).catch(err => {
        console.log(err)
    })
});
</script>
<template>
        <el-select v-model="addDepartmentStore.department.managerId" placeholder="选择负责人"  clearable >
            <el-option v-for="item in userStore.userMangementSelect" :key="item.value" :label="item.label" :value="item.value" />
        </el-select>
</template>
<style scoped></style>